package com.jichangxiu.server.platform.entity.map;

import com.jichangxiu.server.platform.entity.dto.PlatformUserQueryDto;
import com.jichangxiu.server.platform.entity.po.PlatformUser;
import com.jichangxiu.server.platform.entity.vo.PlatformUserAddVo;
import com.jichangxiu.server.platform.entity.vo.PlatformUserEditVo;
import com.jichangxiu.server.platform.entity.vo.PlatformUserQueryVo;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * PlatformUserBasic:
 *
 * @author Jcx
 * @create 2023-03-26 13:43
 */
@Mapper(builder = @Builder(disableBuilder = true))
public interface PlatformUserBasic {

    public PlatformUserBasic INSTANCE = Mappers.getMapper(PlatformUserBasic.class);

    /**
     * 转换 PlatformUser
     *
     * @param platformUserAddVo 视图对象
     * @return 数据库对象
     */
    public PlatformUser toPlatformUser(PlatformUserAddVo platformUserAddVo);

    /**
     * 转换 PlatformUser
     *
     * @param platformUserEditVo 视图对象
     * @return 数据库对象
     */
    public PlatformUser toPlatformUser(PlatformUserEditVo platformUserEditVo);

    /**
     * 转换 PlatformUser
     *
     * @param platformUserQueryVo 视图对象
     * @return 数据库对象
     */
    public PlatformUser toPlatformUser(PlatformUserQueryVo platformUserQueryVo);

    /**
     * 转换 PlatformUserQueryDto
     *
     * @param platformUser 数据库对象
     * @return 数据传输对象
     */
    public PlatformUserQueryDto toPlatformUserQueryDto(PlatformUser platformUser);

    /**
     * 转换 PlatformUserQueryDto 列表
     *
     * @param platformUserList 数据库对象 列表
     * @return 数据传输对象列表
     */
    public List<PlatformUserQueryDto> toPlatformUserQueryDtoList(List<PlatformUser> platformUserList);

}
